<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableMembers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('members', function(Blueprint $table)
        {
            $table->increments('id')->comment('租号');
            $table->string('nickname')->nullable()->comment('昵称');
            $table->string('mobile')->nullable()->comment('手机号，登陆账号');
            $table->string('image',4096)->nullable()->comment('首页展示图');
            $table->tinyInteger('sex')->nullable()->default(1)->comment('性别 1男 2女');
            $table->tinyInteger('status')->default(0)->comment('用户基本信息审核状态 0审核中 1审核成功 -1 审核失败');
            $table->tinyInteger('is_feng')->default(0)->comment('账号是否被封 0未封 1封');
            $table->unsignedSmallInteger('age')->nullable()->comment('年龄');
            $table->string('job')->nullable()->comment('职业');
            $table->unsignedSmallInteger('height')->nullable()->comment('身高');
            $table->unsignedSmallInteger('weight')->nullable()->comment('体重');
            $table->string('free_time')->nullable()->comment('档期');
            $table->string('free_start')->nullable()->comment('档期开始时间');
            $table->string('free_end')->nullable()->comment('档期结束时间');
            $table->string('hobby')->nullable()->comment('爱好');
            $table->string('personal')->nullable()->comment('个人说明');
            $table->string('province')->nullable()->comment('省份');
            $table->string('city')->nullable()->comment('城市');
            $table->string('lng')->nullable()->comment('经度');
            $table->string('lat')->nullable()->comment('纬度');
            $table->unsignedInteger('top')->nullable()->comment('置顶到期时间');
            $table->string('top_num')->nullable()->comment('置顶次数');
            $table->unsignedInteger('vip')->nullable()->comment('会员到期时间');
            $table->unsignedInteger('fans')->default(0)->comment('粉丝数');
            $table->string('money')->default(0)->comment('钱包');
            $table->unsignedInteger('create_time')->comment('用户创建时间');
            $table->unsignedInteger('last_time')->comment('用户最后登陆时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('members');
    }
}
